/**
 * Copyright (c) 2018, wuyy All rights reserved.
 * wuyy 专有/保密源代码,未经许可禁止任何人通过任何渠道使用、修改源代码.
 * QQ:16349023
 * 项目名称 : com.wy2.eclipse.tool.lib
 * @version V1.0
 */
package com.wy2.eclipse.tool.lib.entity;

import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import com.wy2.generator.database.entity.DatabaseTable;

/**
 * 代码生成信息
 * @author wuyy<16349023@qq.com>
 * @date 2018年1月26日上午11:32:04
 * 
 */
public class CodeGenerateInfo extends GenerateInfoBase {

    /**
     * @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么)
     */
    private static final long serialVersionUID = 1L;
    
    private TemplateItem templateItem;
    private String basePackage;
    
    private List<DatabaseTable> tables;
    
    private LinkedHashSet<String> generatedTables;

    public TemplateItem getTemplateItem() {
        return templateItem;
    }

    public void setTemplateItem(TemplateItem templateItem) {
        this.templateItem = templateItem;
    }

    public String getBasePackage() {
        return basePackage;
    }

    public void setBasePackage(String basePackage) {
        this.basePackage = basePackage;
    }

    public List<DatabaseTable> getTables() {
        return tables;
    }

    public void setTables(List<DatabaseTable> tables) {
        this.tables = tables;
    }
    
    public void addTable(DatabaseTable table) {
        if(this.tables==null) {
            this.tables=new ArrayList<DatabaseTable>();
        }
        this.tables.add(table);
    }

    public LinkedHashSet<String> getGeneratedTables() {
        return generatedTables;
    }

    public void setGeneratedTables(LinkedHashSet<String> generatedTables) {
        this.generatedTables = generatedTables;
    }
    public void addGeneratedTable(String tableName) {
        if(this.generatedTables==null) {
            this.generatedTables=new LinkedHashSet<>();
        }
        this.generatedTables.add(tableName);
    }
    
    
}
